﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RssReader.Core.BL;
using System.Web.UI.WebControls;

namespace RssReader.Core.UI
{
	public class RssReaderControl : BaseControl
	{
		#region Private Properties
		private Repeater _rpContentList;
		#endregion

		#region Public Properties

		#endregion

		#region Constructors

		#endregion

		#region Private Methods
		protected override void AttachChildControls()
		{
			_rpContentList = this.FindControl("rpContentList") as Repeater;
			if (this.Context.Items["UriPath"] != null)
			{
				string uriPath = this.Context.Items["UriPath"].ToString();
				RssContent content = new RssContent(uriPath);
				_rpContentList.DataSource = content.Items;
				_rpContentList.DataBind();
			}
		}
		#endregion

		#region Public Methods

		#endregion
		
	}
}
